{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import MultipleLocator, FormatStrFormatter\n",
    "import sys\n",
    "from matplotlib.pyplot import plot,savefig\n",
    "import sys\n",
    "from tqdm import tqdm\n",
    "import multiprocessing as mp\n",
    "import re\n",
    "data_path = \"/mnt/data-1/jintian.cai/pilot/data_collections\"\n",
    "mono_0_50 = \"/mnt/data-1/jintian.cai/pilot/data_collections/mono_sample/sample_050\"\n",
    "mono_10_20 = \"/mnt/data-1/jintian.cai/pilot/data_collections/mono_sample/sample\"\n",
    "fusion6v_0_50 = \"/mnt/data-1/jintian.cai/pilot/data_collections/pre_process/sample_050\"\n",
    "fusion6v_10_20 = \"/mnt/data-1/jintian.cai/pilot/data_collections/pre_process/sample_1020\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "300048"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"/mnt/data-3/huajiang.liu/BADCASE/Lucas/obs/FUSION6V_20220218-152612_191_6_obs.csv\",header=2)\n",
    "df.stamp.max() - df.stamp.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "df=df.drop_duplicates([\"stamp\",\"id\",\"type\"], keep=\"last\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = df[df[\"id\"]==3007]\n",
    "for t in df.stamp.unique():\n",
    "    if len(df[df[\"stamp\"]==t])>1:\n",
    "        print(t)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-12127"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1646709210082 - 1646709222209"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>stamp</th>\n",
       "      <th>sensor_id</th>\n",
       "      <th>id</th>\n",
       "      <th>type</th>\n",
       "      <th>point_pos</th>\n",
       "      <th>x</th>\n",
       "      <th>y</th>\n",
       "      <th>z</th>\n",
       "      <th>roll</th>\n",
       "      <th>pitch</th>\n",
       "      <th>...</th>\n",
       "      <th>image_bottom</th>\n",
       "      <th>objCutInFlag</th>\n",
       "      <th>objDistInLane</th>\n",
       "      <th>Bus</th>\n",
       "      <th>Small_Medium_Car</th>\n",
       "      <th>Trucks</th>\n",
       "      <th>Special_vehicle</th>\n",
       "      <th>Tiny_car</th>\n",
       "      <th>head</th>\n",
       "      <th>rear</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>11364</th>\n",
       "      <td>1645169335191</td>\n",
       "      <td>2</td>\n",
       "      <td>3007</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>45.452</td>\n",
       "      <td>0.07</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>2.94</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 42 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               stamp  sensor_id    id  type  point_pos       x     y    z  \\\n",
       "11364  1645169335191          2  3007     1          2  45.452  0.07  0.0   \n",
       "\n",
       "       roll  pitch  ...  image_bottom  objCutInFlag  objDistInLane  Bus  \\\n",
       "11364   0.0    0.0  ...           0.0             0           2.94    0   \n",
       "\n",
       "       Small_Medium_Car  Trucks  Special_vehicle  Tiny_car  head  rear  \n",
       "11364                 0       0                0         0     0     0  \n",
       "\n",
       "[1 rows x 42 columns]"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df[\"stamp\"]==1645169335191]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5737"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df.stamp.unique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5739"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df.stamp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def readdata(x):\n",
    "    data = pd.read_csv(x, low_memory=False)\n",
    "    data = data.iloc[:,-140:]\n",
    "#     mask = data[\"label\"] != 2\n",
    "\n",
    "    return data\n",
    "\n",
    "def main():\n",
    "    path = mono_0_50\n",
    "    sample_names = os.listdir(path)\n",
    "    pn = []\n",
    "    for sample_name in sample_names:\n",
    "        pn.append(os.path.join(path, sample_name))\n",
    "    pn = pn[0:500]\n",
    "    p = mp.Pool(12)\n",
    "    res = list(tqdm(p.imap(readdata, pn), total=len(pn)))\n",
    "    res = pd.concat(res, axis=0, ignore_index=True)\n",
    "    \n",
    "    p.close()\n",
    "    p.join()\n",
    "    return np.concatenate(res,axis=0) \n",
    "res = main()\n",
    "# if __name__ == \"__main__\":\n",
    "#     main()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(\"/mnt/data-1/jintian.cai/pilot/data_collections/mono_sample/sample_050/ADAS_20210405-115236_272_0_sample.csv\")\n",
    "length_9_loc = df.columns.get_loc(\"length_9\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(601, 1415)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>stamp_9</th>\n",
       "      <th>id_9</th>\n",
       "      <th>uid_9</th>\n",
       "      <th>x_9</th>\n",
       "      <th>y_9</th>\n",
       "      <th>vx_9</th>\n",
       "      <th>vy_9</th>\n",
       "      <th>ax_9</th>\n",
       "      <th>ay_9</th>\n",
       "      <th>yaw_9</th>\n",
       "      <th>...</th>\n",
       "      <th>rear_obs_chassis_by4_9</th>\n",
       "      <th>rear_obs_length_9</th>\n",
       "      <th>rear_obs_width_9</th>\n",
       "      <th>rear_obs_phy_yaw_9</th>\n",
       "      <th>rear_obs_phy_x_9</th>\n",
       "      <th>rear_obs_phy_y_9</th>\n",
       "      <th>rear_obs_phy_vx_9</th>\n",
       "      <th>rear_obs_phy_vy_9</th>\n",
       "      <th>idx_in_lane_9</th>\n",
       "      <th>label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1617594779108</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>47.399</td>\n",
       "      <td>2.806</td>\n",
       "      <td>-7.118</td>\n",
       "      <td>-0.587</td>\n",
       "      <td>-0.038</td>\n",
       "      <td>0.001</td>\n",
       "      <td>-0.02740</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1617594779142</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>47.161</td>\n",
       "      <td>2.807</td>\n",
       "      <td>-7.103</td>\n",
       "      <td>-0.587</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>0.001</td>\n",
       "      <td>-0.02697</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1617594779175</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>46.897</td>\n",
       "      <td>2.808</td>\n",
       "      <td>-7.103</td>\n",
       "      <td>-0.587</td>\n",
       "      <td>-0.044</td>\n",
       "      <td>0.001</td>\n",
       "      <td>-0.02620</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1617594779208</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>46.633</td>\n",
       "      <td>2.808</td>\n",
       "      <td>-7.103</td>\n",
       "      <td>-0.587</td>\n",
       "      <td>-0.049</td>\n",
       "      <td>0.001</td>\n",
       "      <td>-0.02562</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1617594779241</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>46.369</td>\n",
       "      <td>2.808</td>\n",
       "      <td>-7.103</td>\n",
       "      <td>-0.587</td>\n",
       "      <td>-0.054</td>\n",
       "      <td>0.001</td>\n",
       "      <td>-0.02532</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>596</th>\n",
       "      <td>1617595016825</td>\n",
       "      <td>122</td>\n",
       "      <td>0</td>\n",
       "      <td>20.773</td>\n",
       "      <td>3.259</td>\n",
       "      <td>-4.040</td>\n",
       "      <td>0.468</td>\n",
       "      <td>0.080</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02103</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>597</th>\n",
       "      <td>1617595016858</td>\n",
       "      <td>122</td>\n",
       "      <td>0</td>\n",
       "      <td>20.608</td>\n",
       "      <td>3.258</td>\n",
       "      <td>-4.056</td>\n",
       "      <td>0.468</td>\n",
       "      <td>0.074</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02291</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>598</th>\n",
       "      <td>1617595016891</td>\n",
       "      <td>122</td>\n",
       "      <td>0</td>\n",
       "      <td>20.311</td>\n",
       "      <td>3.242</td>\n",
       "      <td>-4.056</td>\n",
       "      <td>0.468</td>\n",
       "      <td>0.079</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02120</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>599</th>\n",
       "      <td>1617595016924</td>\n",
       "      <td>122</td>\n",
       "      <td>0</td>\n",
       "      <td>20.179</td>\n",
       "      <td>3.233</td>\n",
       "      <td>-4.103</td>\n",
       "      <td>0.468</td>\n",
       "      <td>0.079</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02010</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>600</th>\n",
       "      <td>1617595016958</td>\n",
       "      <td>122</td>\n",
       "      <td>0</td>\n",
       "      <td>20.009</td>\n",
       "      <td>3.228</td>\n",
       "      <td>-4.119</td>\n",
       "      <td>0.468</td>\n",
       "      <td>0.071</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.02346</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>601 rows × 140 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           stamp_9  id_9  uid_9     x_9    y_9   vx_9   vy_9   ax_9   ay_9  \\\n",
       "0    1617594779108     0      0  47.399  2.806 -7.118 -0.587 -0.038  0.001   \n",
       "1    1617594779142     0      0  47.161  2.807 -7.103 -0.587 -0.040  0.001   \n",
       "2    1617594779175     0      0  46.897  2.808 -7.103 -0.587 -0.044  0.001   \n",
       "3    1617594779208     0      0  46.633  2.808 -7.103 -0.587 -0.049  0.001   \n",
       "4    1617594779241     0      0  46.369  2.808 -7.103 -0.587 -0.054  0.001   \n",
       "..             ...   ...    ...     ...    ...    ...    ...    ...    ...   \n",
       "596  1617595016825   122      0  20.773  3.259 -4.040  0.468  0.080  0.002   \n",
       "597  1617595016858   122      0  20.608  3.258 -4.056  0.468  0.074  0.002   \n",
       "598  1617595016891   122      0  20.311  3.242 -4.056  0.468  0.079  0.002   \n",
       "599  1617595016924   122      0  20.179  3.233 -4.103  0.468  0.079  0.002   \n",
       "600  1617595016958   122      0  20.009  3.228 -4.119  0.468  0.071  0.001   \n",
       "\n",
       "       yaw_9  ...  rear_obs_chassis_by4_9  rear_obs_length_9  \\\n",
       "0   -0.02740  ...                     NaN                NaN   \n",
       "1   -0.02697  ...                     NaN                NaN   \n",
       "2   -0.02620  ...                     NaN                NaN   \n",
       "3   -0.02562  ...                     NaN                NaN   \n",
       "4   -0.02532  ...                     NaN                NaN   \n",
       "..       ...  ...                     ...                ...   \n",
       "596  0.02103  ...                     NaN                NaN   \n",
       "597  0.02291  ...                     NaN                NaN   \n",
       "598  0.02120  ...                     NaN                NaN   \n",
       "599  0.02010  ...                     NaN                NaN   \n",
       "600  0.02346  ...                     NaN                NaN   \n",
       "\n",
       "     rear_obs_width_9  rear_obs_phy_yaw_9  rear_obs_phy_x_9  rear_obs_phy_y_9  \\\n",
       "0                 NaN                 NaN               NaN               NaN   \n",
       "1                 NaN                 NaN               NaN               NaN   \n",
       "2                 NaN                 NaN               NaN               NaN   \n",
       "3                 NaN                 NaN               NaN               NaN   \n",
       "4                 NaN                 NaN               NaN               NaN   \n",
       "..                ...                 ...               ...               ...   \n",
       "596               NaN                 NaN               NaN               NaN   \n",
       "597               NaN                 NaN               NaN               NaN   \n",
       "598               NaN                 NaN               NaN               NaN   \n",
       "599               NaN                 NaN               NaN               NaN   \n",
       "600               NaN                 NaN               NaN               NaN   \n",
       "\n",
       "     rear_obs_phy_vx_9  rear_obs_phy_vy_9  idx_in_lane_9  label  \n",
       "0                  NaN                NaN            0.0     -1  \n",
       "1                  NaN                NaN            0.0     -1  \n",
       "2                  NaN                NaN            0.0     -1  \n",
       "3                  NaN                NaN            0.0     -1  \n",
       "4                  NaN                NaN            0.0     -1  \n",
       "..                 ...                ...            ...    ...  \n",
       "596                NaN                NaN            0.0     -1  \n",
       "597                NaN                NaN            0.0     -1  \n",
       "598                NaN                NaN            0.0     -1  \n",
       "599                NaN                NaN            0.0     -1  \n",
       "600                NaN                NaN            0.0     -1  \n",
       "\n",
       "[601 rows x 140 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[:,-140:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "truck_mask = res[\"length_9\"] > 6.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "truck_df = res[truck_mask]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1286"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "length_9_loc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[nan, nan, nan, ..., nan, 0.0, -1],\n",
       "       [nan, nan, nan, ..., nan, 0.0, -1],\n",
       "       [nan, nan, nan, ..., nan, 0.0, -1],\n",
       "       ...,\n",
       "       [nan, nan, nan, ..., nan, 0.0, -1],\n",
       "       [nan, nan, nan, ..., nan, 0.0, -1],\n",
       "       [nan, nan, nan, ..., nan, 0.0, -1]], dtype=object)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1415,)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res[0].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
